Skip to main content
Version: 2.x

Class CustomEffect<T>

Custom effect for OdinNative.Wrapper.MediaPipeline callbacks

Assembly: cs.temp.dll.dll
Declaration
public class CustomEffect<T> : PiplineEffect, IPiplineEffect where T : unmanaged

Inheritance: System.Object -> OdinNative.Wrapper.Media.PiplineEffect

Implements:
OdinNative.Wrapper.Media.IPiplineEffect

Methods

Insert(uint, PipelineCallback<T>, T)

Add a OdinNative.Wrapper.Media.CustomEffect to OdinNative.Wrapper.Media.PiplineEffect.Parent pipline.

Declaration
protected virtual uint Insert(uint index, PipelineCallback<T> callback, T userData)
Returns

System.UInt32: effect id

Parameters
TypeNameDescription
System.UInt32indexeffect index in pipeline
Odin.PipelineCallback<<T>>callbackeffect event
<T>userDataWill be passed to callback with OdinNative.Wrapper.Media.CustomEffect

SerializeUserdata(T)

Serialize arbitary userdata

Declaration
public virtual byte[] SerializeUserdata(T value)
Returns

System.Byte[]: byte array representation of userdata value

Parameters
TypeNameDescription
<T>valuebyte array data of value

SerializeUserdata(T, bool)

Serialize arbitary userdata

Declaration
public virtual IntPtr SerializeUserdata(T value, bool destroy = true)
Returns

Odin.IntPtr

Parameters
TypeNameDescription
<T>valueobject data of value
System.Booleandestroytrue to call the DestroyStructure(IntPtr, Type) method.

DeserializeUserdata(byte[])

Deserializes userdata from a byte array

Declaration
public virtual T DeserializeUserdata(byte[] data)
Returns

<T>: Instance of OdinNative.Wrapper.Media.CustomEffect

Parameters
TypeNameDescription
System.Byte[]datacustom userdata

DeserializeUserdata(IntPtr)

Deserializes userdata from a pointer

Declaration
public virtual T DeserializeUserdata(IntPtr ptr)
Returns

<T>: Instance of OdinNative.Wrapper.Media.CustomEffect

Parameters
TypeNameDescription
Odin.IntPtrptrpointer

Create(MediaPipeline, PipelineCallback<T>, T)

Insert a custom effect in the specified pipline

Declaration
public static CustomEffect<T> Create(MediaPipeline pipeline, PipelineCallback<T> callback, T userData)
Returns

OdinNative.Wrapper.Media.CustomEffect<T>: Instance of OdinNative.Wrapper.Media.CustomEffect

Parameters
TypeNameDescription
OdinNative.Wrapper.MediaPipelinepipelinewhere to create a vad effect
Odin.PipelineCallback<<T>>callbackdelegate reference for effect event
<T>userDatacustom userdata Marshal.StructureToPtr

Serialize(T)

Serialize structure to pointer for arbitary data

Declaration
public static byte[] Serialize(T value)
Returns

System.Byte[]: byte array representation of data structure

Parameters
TypeNameDescription
<T>valuedata structure

Serialize(T, bool)

Serialize structure to pointer for arbitary data

Declaration
public static IntPtr Serialize(T value, bool destroy = true)
Returns

Odin.IntPtr: pointer of data structure

Parameters
TypeNameDescription
<T>valuedata structure
System.Booleandestroyfree value

Deserialize(byte[])

Deserializes a structure from a byte array

Declaration
public static T Deserialize(byte[] data)
Returns

<T>: structure

Parameters
TypeNameDescription
System.Byte[]databinary data to deserialize

Deserialize(IntPtr)

Deserializes a structure from a pointer

Declaration
public static T Deserialize(IntPtr ptr)
Returns

<T>: structure

Parameters
TypeNameDescription
Odin.IntPtrptrpointer to deserialize as structure

Implements